//package validator;
//
//import org.springframework.stereotype.Component;
//import org.springframework.validation.Errors;
//import org.springframework.validation.Validator;
//
//import command.AnswerForm;
//
//@Component
//public class AnswerFormValidator implements Validator {
//
//	@Override
//	public boolean supports(Class<?> clazz) {
//		return AnswerForm.class.equals(clazz);
//	}
//	
//	@Override
//	public void validate(Object target, Errors errors) {
//		AnswerForm form = (AnswerForm) target;
//		if(form.getAnswer() == null || form.getAnswer().isEmpty()){
//			errors.rejectValue("answer","empty");
//		}
//	}
//}